{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "62df1dee",
   "metadata": {},
   "source": [
    "## 1. API U本位合约行情接口总览"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fd639284",
   "metadata": {},
   "source": [
    "|方法|解释|Path|\n",
    "|:---|:---|:---|\n",
    "|get_ping|测试服务器连通性 PING|/fapi/v1/ping|\n",
    "|get_time|获取服务器时间|/fapi/v1/time|\n",
    "|get_exchangeInfo|获取交易规则和交易对|/fapi/v1/exchangeInfo|\n",
    "|get_depth|深度信息|/fapi/v1/depth|\n",
    "|get_trades|近期成交|/fapi/v1/trades|\n",
    "|get_historicalTrades|查询历史成交(MARKET_DATA)|/fapi/v1/historicalTrades|\n",
    "|get_aggTrades|近期成交(归集)|/fapi/v1/aggTrades|\n",
    "|get_klines|K线数据|/fapi/v1/klines|\n",
    "|get_continuousKlines|连续合约K线数据|/fapi/v1/continuousKlines|\n",
    "|get_indexPriceKlines|价格指数K线数据|/fapi/v1/indexPriceKlines|\n",
    "|get_markPriceKlines|标记价格K线数据|/fapi/v1/markPriceKlines|\n",
    "|get_premiumIndexKlines|溢价指数K线数据|/fapi/v1/premiumIndexKlines|\n",
    "|get_premiumIndex|最新标记价格和资金费率|/fapi/v1/premiumIndex|\n",
    "|get_fundingRate|查询资金费率历史|/fapi/v1/fundingRate|\n",
    "|get_fundingInfo|查询资金费率信息|/fapi/v1/fundingInfo|\n",
    "|get_ticker_24hr|24hr价格变动情况|/fapi/v1/ticker/24hr|\n",
    "|get_ticker_price_v1|最新价格|/fapi/v1/ticker/price|\n",
    "|get_ticker_price|最新价格V2|/fapi/v2/ticker/price|\n",
    "|get_ticker_bookTicker|当前最优挂单|/fapi/v1/ticker/bookTicker|\n",
    "|get_openInterest|获取未平仓合约数|/fapi/v1/openInterest|\n",
    "|get_delivery_price|季度合约历史结算价|/futures/data/delivery-price|\n",
    "|get_openInterestHist|合约持仓量|/futures/data/openInterestHist|\n",
    "|get_topLongShortAccountRatio|大户账户数多空比|/futures/data/topLongShortAccountRatio|\n",
    "|get_topLongShortPositionRatio|大户持仓量多空比|/futures/data/topLongShortPositionRatio|\n",
    "|get_globalLongShortAccountRatio|多空持仓人数比|/futures/data/globalLongShortAccountRatio|\n",
    "|get_takerlongshortRatio|合约主动买卖量|/futures/data/takerlongshortRatio|\n",
    "|get_basis|基差|/futures/data/basis|\n",
    "|get_lvtKlines|杠杆代币历史净值K线|/fapi/v1/lvtKlines|\n",
    "|get_indexInfo|综合指数交易对信息|/fapi/v1/indexInfo|\n",
    "|get_assetIndex|多资产模式资产汇率指数|/fapi/v1/assetIndex|\n",
    "|get_constituents|查询指数价格成分|/fapi/v1/constituents|"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6902627d",
   "metadata": {},
   "source": [
    "## 2. 模型实例化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "9e23f6c8",
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime\n",
    "from binance_interface.api import UM\n",
    "from binance_interface.app.utils import eprint"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "8d97f370",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 转发：需搭建转发服务器，可参考：https://github.com/pyted/binance_resender\n",
    "proxy_host = None\n",
    "um = UM(\n",
    "    proxy_host=proxy_host\n",
    ")\n",
    "market = um.market"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "94830f1a",
   "metadata": {},
   "source": [
    "## 3. U本位合约实时行情"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f870d16a",
   "metadata": {},
   "source": [
    "### 3.1 当前最优挂单 get_ticker_bookTicker"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "0900d9f2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': [{'symbol': 'BTCUSDT',\n",
      "           'bidPrice': '40158.10',\n",
      "           'bidQty': '1.750',\n",
      "           'askPrice': '40158.20',\n",
      "           'askQty': '7.586',\n",
      "           '...': '......'},\n",
      "          {'symbol': 'ETHUSDT',\n",
      "           'bidPrice': '2222.27',\n",
      "           'bidQty': '5.638',\n",
      "           'askPrice': '2222.28',\n",
      "           'askQty': '27.227',\n",
      "           '...': '......'},\n",
      "          {'symbol': 'BCHUSDT',\n",
      "           'bidPrice': '235.89',\n",
      "           'bidQty': '1.539',\n",
      "           'askPrice': '235.90',\n",
      "           'askQty': '4.531',\n",
      "           '...': '......'},\n",
      "          {'symbol': 'XRPUSDT',\n",
      "           'bidPrice': '0.5139',\n",
      "           'bidQty': '22041.0',\n",
      "           'askPrice': '0.5140',\n",
      "           'askQty': '101329.3',\n",
      "           '...': '......'},\n",
      "          {'symbol': 'EOSUSDT',\n",
      "           'bidPrice': '0.690',\n",
      "           'bidQty': '162800.4',\n",
      "           'askPrice': '0.691',\n",
      "           'askQty': '116329.8',\n",
      "           '...': '......'},\n",
      "          '......'],\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "# 现货全部产品\n",
    "bookTicker_result = market.get_ticker_bookTicker()\n",
    "eprint(bookTicker_result, data_length=5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8af9d20a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': {'symbol': 'BTCUSDT',\n",
      "          'bidPrice': '40148.30',\n",
      "          'bidQty': '0.808',\n",
      "          'askPrice': '40148.40',\n",
      "          'askQty': '5.244',\n",
      "          'time': 1706245394375,\n",
      "          'lastUpdateId': 3888877129825},\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "# 现货单个交易对\n",
    "bookTicker_result = market.get_ticker_bookTicker(symbol='BTCUSDT')\n",
    "eprint(bookTicker_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "56e9b771",
   "metadata": {},
   "source": [
    "### 3.2 最新价格 get_ticker_price"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "6d0e0512",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': [{'symbol': 'NEARUSDT', 'price': '2.7580', 'time': 1706245389313},\n",
      "          {'symbol': '1000SATSUSDT', 'price': '0.0004072', 'time': 1706245399913},\n",
      "          {'symbol': 'UMAUSDT', 'price': '5.321000', 'time': 1706245400559},\n",
      "          {'symbol': 'GALAUSDT', 'price': '0.02223', 'time': 1706245396551},\n",
      "          {'symbol': 'MINAUSDT', 'price': '1.0101000', 'time': 1706245396476},\n",
      "          '......'],\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "# 现货全部产品\n",
    "price_result = market.get_ticker_price()\n",
    "eprint(price_result, data_length=5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e67c1dd8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200, 'data': {'symbol': 'BTCUSDT', 'price': '40146.70', 'time': 1706245405158}, 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "# 现货单个产品\n",
    "price_result = market.get_ticker_price(symbol='BTCUSDT')\n",
    "eprint(price_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bc627177",
   "metadata": {},
   "source": [
    "### 3.3 24hr价格变动情况 get_ticker_24hr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "014b8ebb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': [{'symbol': 'ATAUSDT',\n",
      "           'priceChange': '0.0020',\n",
      "           'priceChangePercent': '2.389',\n",
      "           'weightedAvgPrice': '0.0843',\n",
      "           'lastPrice': '0.0857',\n",
      "           '...': '......'},\n",
      "          {'symbol': 'XMRUSDT',\n",
      "           'priceChange': '6.70',\n",
      "           'priceChangePercent': '4.404',\n",
      "           'weightedAvgPrice': '156.27',\n",
      "           'lastPrice': '158.82',\n",
      "           '...': '......'},\n",
      "          {'symbol': 'BLUEBIRDUSDT',\n",
      "           'priceChange': '0.10800',\n",
      "           'priceChangePercent': '1.381',\n",
      "           'weightedAvgPrice': '7.88532',\n",
      "           'lastPrice': '7.92700',\n",
      "           '...': '......'},\n",
      "          {'symbol': 'POLYXUSDT',\n",
      "           'priceChange': '0.0028000',\n",
      "           'priceChangePercent': '1.808',\n",
      "           'weightedAvgPrice': '0.1557668',\n",
      "           'lastPrice': '0.1577000',\n",
      "           '...': '......'},\n",
      "          {'symbol': 'ATOMUSDT',\n",
      "           'priceChange': '0.142',\n",
      "           'priceChangePercent': '1.546',\n",
      "           'weightedAvgPrice': '9.205',\n",
      "           'lastPrice': '9.327',\n",
      "           '...': '......'},\n",
      "          '......'],\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "# 现货全部产品\n",
    "hr24_result = market.get_ticker_24hr()\n",
    "eprint(hr24_result, data_length=5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "04dbc114",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': {'symbol': 'BTCUSDT',\n",
      "          'priceChange': '253.80',\n",
      "          'priceChangePercent': '0.636',\n",
      "          'weightedAvgPrice': '39934.69',\n",
      "          'lastPrice': '40148.20',\n",
      "          'lastQty': '0.022',\n",
      "          'openPrice': '39894.40',\n",
      "          'highPrice': '40300.00',\n",
      "          'lowPrice': '39535.30',\n",
      "          'volume': '209588.044',\n",
      "          'quoteVolume': '8369834245.01',\n",
      "          'openTime': 1706158980000,\n",
      "          'closeTime': 1706245408978,\n",
      "          'firstId': 4527594884,\n",
      "          'lastId': 4530284646,\n",
      "          'count': 2689755},\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "# 现货单个产品\n",
    "hr24_result = market.get_ticker_24hr(symbol='BTCUSDT')\n",
    "eprint(hr24_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1e9467f6",
   "metadata": {},
   "source": [
    "## 4. 历史K线 get_klines"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "dbd1f710",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2023-01-01 00:00:00 1672502400000\n",
      "2023-01-01 00:05:00 1672502700000\n"
     ]
    }
   ],
   "source": [
    "# 测试时间\n",
    "startDatetime = '2023-01-01 00:00:00'\n",
    "endDatetime = '2023-01-01 00:05:00'\n",
    "startTime = int(datetime.datetime.strptime(startDatetime, '%Y-%m-%d %H:%M:%S').timestamp() * 1000)\n",
    "endTime = int(datetime.datetime.strptime(endDatetime, '%Y-%m-%d %H:%M:%S').timestamp() * 1000)\n",
    "\n",
    "print(startDatetime, startTime)\n",
    "print(endDatetime, endTime)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "7889aadc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': [[1672502640000, '16587.90', '16588.00', '16587.70', '16587.70', '......'],\n",
      "          [1672502700000, '16587.70', '16587.70', '16586.90', '16587.00', '......']],\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "# 仅给定终止时间\n",
    "kline_result = market.get_klines(symbol='BTCUSDT', interval='1m', endTime=endTime, limit=2)\n",
    "eprint(kline_result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "9b222037",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': [[1672502400000, '16586.10', '16591.20', '16586.00', '16591.10', '......'],\n",
      "          [1672502460000, '16591.10', '16591.50', '16590.80', '16590.90', '......'],\n",
      "          [1672502520000, '16590.80', '16591.70', '16590.80', '16591.70', '......'],\n",
      "          [1672502580000, '16591.60', '16591.70', '16587.90', '16587.90', '......'],\n",
      "          [1672502640000, '16587.90', '16588.00', '16587.70', '16587.70', '......'],\n",
      "          [1672502700000, '16587.70', '16587.70', '16586.90', '16587.00', '......']],\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "# 仅给定起始和终止时间\n",
    "kline_result = market.get_klines(\n",
    "    symbol='BTCUSDT',\n",
    "    interval='1m',\n",
    "    startTime=startTime,  # 包括startTime\n",
    "    endTime=endTime,  # 包括endTime\n",
    ")\n",
    "eprint(kline_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "47aa7608",
   "metadata": {},
   "source": [
    "## 5. 深度信息 get_depth"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "07b94d05",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': {'lastUpdateId': 3888878453883,\n",
      "          'E': 1706245426397,\n",
      "          'T': 1706245426390,\n",
      "          'bids': [['40152.50', '0.131'],\n",
      "                   ['40152.40', '0.008'],\n",
      "                   ['40152.20', '0.005'],\n",
      "                   ['40152.10', '0.013'],\n",
      "                   ['40151.90', '0.038']],\n",
      "          'asks': [['40152.60', '3.099'],\n",
      "                   ['40152.70', '0.008'],\n",
      "                   ['40152.80', '0.008'],\n",
      "                   ['40152.90', '0.005'],\n",
      "                   ['40153.00', '0.005']]},\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "depth_result = market.get_depth(symbol='BTCUSDT', limit=5)\n",
    "eprint(depth_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "89e5b741",
   "metadata": {},
   "source": [
    "## 6. 成交查询"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6eb604d9",
   "metadata": {},
   "source": [
    "### 6.1 近期成交列表 get_trades"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "298de9b2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': [{'id': 4530285100,\n",
      "           'price': '40151.90',\n",
      "           'qty': '0.003',\n",
      "           'quoteQty': '120.45',\n",
      "           'time': 1706245427482,\n",
      "           '...': '......'},\n",
      "          {'id': 4530285101,\n",
      "           'price': '40151.70',\n",
      "           'qty': '0.003',\n",
      "           'quoteQty': '120.45',\n",
      "           'time': 1706245427482,\n",
      "           '...': '......'},\n",
      "          {'id': 4530285102,\n",
      "           'price': '40151.60',\n",
      "           'qty': '0.005',\n",
      "           'quoteQty': '200.75',\n",
      "           'time': 1706245427482,\n",
      "           '...': '......'},\n",
      "          {'id': 4530285103,\n",
      "           'price': '40151.50',\n",
      "           'qty': '0.002',\n",
      "           'quoteQty': '80.30',\n",
      "           'time': 1706245427482,\n",
      "           '...': '......'},\n",
      "          {'id': 4530285104,\n",
      "           'price': '40151.20',\n",
      "           'qty': '0.026',\n",
      "           'quoteQty': '1043.93',\n",
      "           'time': 1706245428266,\n",
      "           '...': '......'}],\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "trades_result = market.get_trades(symbol='BTCUSDT', limit=5)\n",
    "eprint(trades_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2dddfcd2",
   "metadata": {},
   "source": [
    "### 6.2  查询历史成交 get_historicalTrades"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "59747e3a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': [{'id': 4530285131,\n",
      "           'price': '40151.30',\n",
      "           'qty': '0.004',\n",
      "           'quoteQty': '160.60',\n",
      "           'time': 1706245430957,\n",
      "           '...': '......'},\n",
      "          {'id': 4530285132,\n",
      "           'price': '40151.30',\n",
      "           'qty': '0.003',\n",
      "           'quoteQty': '120.45',\n",
      "           'time': 1706245431264,\n",
      "           '...': '......'},\n",
      "          {'id': 4530285133,\n",
      "           'price': '40151.20',\n",
      "           'qty': '0.007',\n",
      "           'quoteQty': '281.05',\n",
      "           'time': 1706245431698,\n",
      "           '...': '......'},\n",
      "          {'id': 4530285134,\n",
      "           'price': '40151.20',\n",
      "           'qty': '0.006',\n",
      "           'quoteQty': '240.90',\n",
      "           'time': 1706245431698,\n",
      "           '...': '......'},\n",
      "          {'id': 4530285135,\n",
      "           'price': '40151.20',\n",
      "           'qty': '0.110',\n",
      "           'quoteQty': '4416.63',\n",
      "           'time': 1706245431698,\n",
      "           '...': '......'}],\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "historicalTrades_result = market.get_historicalTrades(symbol='BTCUSDT', limit=5)  # 这个接口需要key\n",
    "eprint(historicalTrades_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "173b0cf6",
   "metadata": {},
   "source": [
    "### 6.3  近期成交(归集) get_aggTrades "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "c65f2e54",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': [{'a': 2000008269, 'p': '40151.20', 'q': '0.003', 'f': 4530285152, 'l': 4530285152, '...': '......'},\n",
      "          {'a': 2000008270, 'p': '40151.20', 'q': '0.422', 'f': 4530285153, 'l': 4530285176, '...': '......'},\n",
      "          {'a': 2000008271, 'p': '40151.10', 'q': '0.008', 'f': 4530285177, 'l': 4530285178, '...': '......'},\n",
      "          {'a': 2000008272, 'p': '40151.00', 'q': '0.005', 'f': 4530285179, 'l': 4530285179, '...': '......'},\n",
      "          {'a': 2000008273, 'p': '40150.90', 'q': '0.005', 'f': 4530285180, 'l': 4530285180, '...': '......'}],\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "aggTrades_result = market.get_aggTrades(symbol='BTCUSDT', limit=5)\n",
    "eprint(aggTrades_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ca8352a8",
   "metadata": {},
   "source": [
    "## 7. 交易规范信息 get_exchangeInfo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "d07025d6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'code': 200,\n",
      " 'data': {'timezone': 'UTC',\n",
      "          'serverTime': 1706241611125,\n",
      "          'futuresType': 'U_MARGINED',\n",
      "          'rateLimits': [{'rateLimitType': 'REQUEST_WEIGHT', 'interval': 'MINUTE', 'intervalNum': 1, 'limit': 2400},\n",
      "                         {'rateLimitType': 'ORDERS', 'interval': 'MINUTE', 'intervalNum': 1, 'limit': 1200},\n",
      "                         {'rateLimitType': 'ORDERS', 'interval': 'SECOND', 'intervalNum': 10, 'limit': 300}],\n",
      "          'exchangeFilters': [],\n",
      "          'assets': [{'asset': 'USDT', 'marginAvailable': True, 'autoAssetExchange': '-10000'},\n",
      "                     {'asset': 'BTC', 'marginAvailable': True, 'autoAssetExchange': '-0.10000000'},\n",
      "                     {'asset': 'BNB', 'marginAvailable': True, 'autoAssetExchange': '-10'},\n",
      "                     {'asset': 'ETH', 'marginAvailable': True, 'autoAssetExchange': '-5'},\n",
      "                     {'asset': 'XRP', 'marginAvailable': True, 'autoAssetExchange': '0'},\n",
      "                     '......'],\n",
      "          'symbols': [{'symbol': 'BTCUSDT',\n",
      "                       'pair': 'BTCUSDT',\n",
      "                       'contractType': 'PERPETUAL',\n",
      "                       'deliveryDate': 4133404800000,\n",
      "                       'onboardDate': 1569398400000,\n",
      "                       '...': '......'},\n",
      "                      {'symbol': 'ETHUSDT',\n",
      "                       'pair': 'ETHUSDT',\n",
      "                       'contractType': 'PERPETUAL',\n",
      "                       'deliveryDate': 4133404800000,\n",
      "                       'onboardDate': 1569398400000,\n",
      "                       '...': '......'},\n",
      "                      {'symbol': 'BCHUSDT',\n",
      "                       'pair': 'BCHUSDT',\n",
      "                       'contractType': 'PERPETUAL',\n",
      "                       'deliveryDate': 4133404800000,\n",
      "                       'onboardDate': 1569398400000,\n",
      "                       '...': '......'},\n",
      "                      {'symbol': 'XRPUSDT',\n",
      "                       'pair': 'XRPUSDT',\n",
      "                       'contractType': 'PERPETUAL',\n",
      "                       'deliveryDate': 4133404800000,\n",
      "                       'onboardDate': 1569398400000,\n",
      "                       '...': '......'},\n",
      "                      {'symbol': 'EOSUSDT',\n",
      "                       'pair': 'EOSUSDT',\n",
      "                       'contractType': 'PERPETUAL',\n",
      "                       'deliveryDate': 4133404800000,\n",
      "                       'onboardDate': 1569398400000,\n",
      "                       '...': '......'},\n",
      "                      '......']},\n",
      " 'msg': ''}\n"
     ]
    }
   ],
   "source": [
    "exchangeInfo_result = market.get_exchangeInfo()\n",
    "eprint(exchangeInfo_result)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
